/**
 * 2015-2016 龙果学院 (www.roncoo.com)
 */
package com.chunguang.study.controller;

import java.util.HashMap;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.chunguang.study.bean.RoncooUser;
import com.chunguang.study.service.UserService;

/**
 * @author wujing
 */
@RestController
@RequestMapping(value = "/redis", method = RequestMethod.GET)
public class RedisCacheController {
	@Autowired
	private UserService userService;
	@RequestMapping(value = "/get")
	public HashMap<String, Object> get( ) {
		HashMap<String, Object> map = new HashMap<String, Object>();
		RoncooUser user = userService.getUserById(1);
		map.put("title", user.toString());
		 
		
		return map;
	}
}
